home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / wp / sleek26.zip / SLEEK.DOC < prev    next >
Text File  |  1992-10-25  |  11KB  |  334 lines

  1.  
  2. SLEEK (SLK.EXE), a file-reformatting utility
  3. Version: 2.6
  4. Oct.25, 1992
  5.  
  6. SLEEK is Copyright 1991, 1992 by Lambert Klein
  7. P.O. Box 611
  8. Wayne MI  48184
  9. Voice telephone: (313) 326-1583
  10.  
  11. GEnie:       L.Klein1
  12. CompuServe:  72010,624
  13. Internet:    72010.624@compuserve.com
  14.  
  15. Member, Association of Shareware Professionals
  16.  
  17. =======================================================
  18.  
  19.               ┌─────────┐
  20.         ┌─────┴───┐     │               (R)
  21.       ──│         │o    │──────────────────
  22.         │   ┌─────┴╨──┐ │  Association of
  23.         │   │         │─┘  Shareware
  24.         └───│    o    │    Professionals
  25.       ──────│    ║    │────────────────────
  26.             └────╨────┘    MEMBER
  27.  
  28. "This program is produced by a member of the Association of
  29. Shareware Professionals (ASP). ASP wants to make sure that
  30. the shareware principle works for you. If you are unable to
  31. resolve a shareware-related problem with an ASP member by
  32. contacting the member directly, ASP may be able to help. The
  33. ASP Ombudsman can help you resolve a dispute or problem with
  34. an ASP member, but does not provide technical support for
  35. members' products. Please write to the ASP Ombudsman at 545
  36. Grover Road Muskegon MI 49442 or send a Compuserve message
  37. via easyplex to ASP Ombudsman 70007,3536."
  38.  
  39. ============================================================
  40. SLK.EXE is shareware. If you try it out, find it useful and
  41. go on using it - please register it. Registration is only
  42. $10.00.
  43. ============================================================
  44.  
  45.         PURPOSE
  46.  
  47. SLEEK is a high-speed text reformatter. Its purpose is to
  48. alter the lengths of lines in plain-text files, such as
  49. those created by text editors like PC-Write or Qedit (or
  50. files saved "unformatted" - but with "hard" line endings
  51. within paragraphs - by word processing programs such as
  52. Microsoft Word).
  53.  
  54. ---------------------------------------------------------
  55. Documentation for SLEEK (SLK.EXE), v. 2.6.        Page 1
  56. (c) Copyright 1991, 1992 Lambert Klein
  57.  
  58.  
  59. The program is useful for reformatting text files with
  60. relatively short line lengths, perhaps (as with this file)
  61. because the writer assumed you'd be using a typical dot-
  62. matrix printer setup to print them. But if you're using, say,
  63. compressed mode for printing, you might prefer that the lines
  64. be longer (thereby saving some paper). SLEEK can help with
  65. this by increasing the line lengths to your specifications.
  66.  
  67.         WHAT IT DOES
  68.  
  69. You can tell SLEEK to format line lengths out to a specified
  70. column, from 10 to 60,000. If you do not specify any column
  71. width, SLEEK changes all paragraphs in a text file to a
  72. single long line (with exceptions as noted below).
  73.  
  74. The latter function is useful to people who must take text
  75. files containing many "hard" line breaks and import them
  76. into a desktop publishing (DTP) program or open them with a
  77. program like Microsoft Word. It is almost always desirable
  78. to allow DTP programs, or Word and others like it, to make
  79. their own decisions about line breaks. "Hard" returns inside
  80. paragraphs in typical plain-text files block automatic line-
  81. wrapping - a major pain in the neck for the DTP program
  82. user. The solution is often either tedious manual
  83. reformatting or multiple passes through the file with a
  84. search/replace program (or with a DTP program's search/
  85. replace routine).
  86.  
  87. SLEEK, which is written entirely in assembly language, does
  88. its work quickly. For example, on a RAM disk on a 486-33
  89. computer, SLEEK has been observed to process a 105K text
  90. file - removing ALL hard breaks within paragraphs - in less
  91. than one second (if it had been re-breaking lines to
  92. SPECIFIED lengths, it would probably have taken several
  93. seconds to process the file). (Of course, as they say: Your
  94. mileage may vary.)
  95.  
  96.         HOW IT WORKS
  97.  
  98. SLEEK first trims extra spaces from the ends of lines. Then,
  99. on any line to be merged with the one below it, the "newline
  100. character" at the end of the line (actually, a carriage
  101. return followed by a line feed) is removed and replaced by a
  102. single space.
  103.  
  104. Reformatting stops at the end of a paragraph - which, from
  105. SLEEK's point of view, occurs when there are two or more
  106. "newlines" in a row - and begins again at the top of the
  107. next paragraph. (SLEEK does not do anything to blank lines.)
  108.  
  109. ---------------------------------------------------------
  110. Documentation for SLEEK (SLK.EXE), v. 2.6.        Page 2
  111. (c) Copyright 1991, 1992 Lambert Klein
  112.  
  113.  
  114. Another exception: Reformatting does NOT occur on any lines
  115. that begin with one or more spaces OR tab characters. Thus,
  116. you can use leading spaces or tabs to help control how the
  117. output file will look. (See the examples later in this
  118. documentation.)
  119.  
  120. What about hyphens? Hyphens are used in a couple of
  121. different ways within plain-text files: to force-hyphenate
  122. words and/or to create simulated "EM" or "EN" dashes.
  123.  
  124. If SLEEK, in reformatting a text file, must join a line with
  125. the one below it, and if the first line ends with a hyphen
  126. followed by a space, the space will be RETAINED when the two
  127. lines are joined. This is to ensure that if the hyphen-
  128. followed-by-space is part of a dash - just like that - the
  129. same positioning of spaces and hyphen(s) will be retained in
  130. the output file.
  131.  
  132. On the other hand, if a line ends with a manually-
  133. hyphenated word (just like that), SLEEK will NOT add a space
  134. after the hyphen if the line is joined with the one below
  135. it - unless there is ALREADY a space to the right of the
  136. hyphen in the input file (which would normally be a mistake
  137. in a situation like that).
  138.  
  139. SLEEK will never force a break INSIDE a word, but if it is
  140. shortening lines: When it encounters a hyphenated word it
  141. will, if possible, break the word at the hyphen, leaving the
  142. hyphen on the upper line.
  143.  
  144.         PROGRAM SYNTAX
  145.  
  146. SLK d:\path\filename /nn
  147.  
  148. where:
  149.  
  150. "d:\path\" represents OPTIONAL path information to tell
  151. SLEEK the location of the file to be processed (the input
  152. file);
  153.  
  154. "filename" is the name of the input file; and
  155.  
  156. "/nn" is an OPTIONAL command-line "switch" telling SLEEK at
  157. what column to re-break the lines in the file. For example,
  158. "/50" would tell SLEEK to reformat the lines out to column
  159. 50. The "nn" value can be 0, or in a range from 10 to 60000.
  160.  
  161. If you use "/0," SLEEK will use its maximum line-length
  162. setting (60,000). If you completely OMIT the "/nn"
  163. information, you're also in effect telling SLEEK to use its
  164.  
  165. ---------------------------------------------------------
  166. Documentation for SLEEK (SLK.EXE), v. 2.6.        Page 3
  167. (c) Copyright 1991, 1992 Lambert Klein
  168.  
  169.  
  170. maximum line-length setting (in which case the effect is to
  171. make all paragraphs in the file into a single long line -
  172. unless they begin with one or more spaces or tabs, or unless
  173. they are longer than 60,000 characters - not too likely).
  174.  
  175. If you use a "/nn" setting of from 1 to 9, SLEEK will
  176. default to a setting of 10.
  177.  
  178. NOTE: The alternate command-line switch character (a hyphen)
  179.       is supported in this version of SLEEK.
  180.  
  181.         OUTPUT FILES
  182.  
  183. SLEEK never over-writes your original file. It creates an
  184. output file having the same "base" name as the input file,
  185. but with the extension ".SLK." Thus: INPUT.DOC --> INPUT.SLK.
  186.  
  187. If you include a path in the input file name, that path will
  188. also be used for the output file.
  189.  
  190. Thus:  D:\INPUT.DOC --> D:\INPUT.SLK, even if you are not
  191. logged onto D:\ at the time you give the SLEEK command.
  192.  
  193. CAUTION: The program will OVER-WRITE an existing .SLK file
  194.          without query. If you run SLEEK on a file called
  195.          INPUT.DOC twice: The second time around, the new
  196.          INPUT.SLK will replace the first.
  197.  
  198.          *NEVER* use for input a file whose extension is
  199.          ".SLK". The result is that you'll lose the input
  200.          file completely; it will be written back to disk
  201.          as a zero-length file.
  202.  
  203.         OTHER LIMITATIONS
  204.  
  205. The present version of SLK does not accept wildcards in the
  206. input file name.
  207.  
  208. Files whose line endings consist ONLY of a carriage-return
  209. character (as with text files written on a Macintosh) are
  210. not suitable as input files until you add a line feed to
  211. each carriage return. Files whose lines end with ONLY a
  212. line feed character (as with text files written on a Unix
  213. system) will be processed almost, but not quite, as
  214. described above (the results are not entirely predictable).
  215. For best results, ensure that all "newlines" are carriage-
  216. return/line-feed pairs.
  217.  
  218. NOTE: SLK.EXE *CAN* read past a CTRL-Z (end-of-file)
  219.       character in an input file. It will not remove the
  220.       CTRL-Z and will go on processing lines below it.
  221. ---------------------------------------------------------
  222. Documentation for SLEEK (SLK.EXE), v. 2.6.        Page 4
  223. (c) Copyright 1991, 1992 Lambert Klein
  224.  
  225.  
  226.         EXAMPLES
  227.  
  228. Suppose the input file (call it TEST.DOC) looks like this:
  229.  
  230. Line one.
  231. Line two.
  232. Line three.
  233. Line four.
  234.  
  235. Line five.
  236. Line six.
  237.  
  238. ... and you use this command line:
  239.  
  240.         SLK test.doc
  241.  
  242. (no line length specified) The output file, TEST.SLK, will
  243. look like this:
  244.  
  245. Line one. Line two. Line three. Line four.
  246.  
  247. Line five. Line six.
  248.  
  249. Suppose instead the input file looks like the output file
  250. shown immediately above, and you use this command line:
  251.  
  252.         SLK test.doc /31
  253.  
  254. The result is:
  255.  
  256. Line one. Line two. Line three.
  257. Line four.
  258.  
  259. Line five. Line six.
  260.  
  261. If the input file TEST.DOC looks like this:
  262.  
  263. Line one. Line two.
  264.   Line three.
  265.   Line four.
  266. Line five.
  267.   Line six.
  268. Line seven.
  269.  
  270. Line eight.
  271. Line nine.
  272.  
  273. ... and you give this command (again, with no line-length
  274. information):
  275.  
  276.         SLK test.doc
  277.  
  278. ... then the output file, TEST.SLK, looks like this:
  279. ---------------------------------------------------------
  280. Documentation for SLEEK (SLK.EXE), v. 2.6.        Page 5
  281. (c) Copyright 1991, 1992 Lambert Klein
  282.  
  283. Line one. Line two.
  284.   Line three.
  285.   Line four. Line five.
  286.   Line six. Line seven.
  287.  
  288.  Line eight. Line nine.
  289.  
  290. That illustrates how lines beginning with spaces are NOT
  291. merged with adjacent lines just above them and ARE merged
  292. with lines just below them - unless the lines below ALSO
  293. begin with one or more spaces.
  294.  
  295.  
  296. I hope you find SLEEK useful. If you have any comments,
  297. suggestions, bug reports, and so on, please send them to me
  298. at the address shown above. See the file PROGRAMS.TXT, also
  299. in the archive SLEEK.ZIP, for information on my other
  300. shareware, including PrintPlus, my menu-driven dot-matrix
  301. printer control program.
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322. Any registered or trademarked product names mentioned in
  323. this documentation are the property of their respective
  324. owners or publishers.
  325.  
  326. (Documentation assistant: Mike Arst, Compuserve 70403,1337)
  327.  
  328.  
  329.  
  330. ---------------------------------------------------------
  331. Documentation for SLEEK (SLK.EXE), v. 2.6.        Page 6
  332. (c) Copyright 1991, 1992 Lambert Klein
  333.  
  334.